package com.sdweizan.sdk.bytedance.bean.withdraw;

import com.alibaba.fastjson.annotation.JSONField;
import com.sdweizan.sdk.bytedance.bean.BdBaseRequest;
import com.sdweizan.sdk.bytedance.constants.BdConstants;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class BdMerchantWithdrawRequest implements BdBaseRequest {

  @JSONField(name = "thirdparty_id")
  private String thirdpartyId;

  @JSONField(name = "app_id")
  private String appId;

  @JSONField(name = "merchant_uid")
  private String merchantUid;
  // 提现渠道枚举值:
  // alipay: 支付宝
  // wx: 微信
  // hz: 抖音支付
  // yeepay: 易宝
  // yzt: 担保支付企业版聚合账户
  @JSONField(name = "channel_type")
  private String channelType;
  // 提现金额；单位分
  @JSONField(name = "withdraw_amount")
  private Long withdrawAmount;

  @JSONField(name = "out_order_id")
  private String outOrderId;

  @JSONField(name = "sign")
  private String sign;
  // 提现结果通知接口（开发者自己的https服务）；如果不传默认用支付设置中的回调地址
  @JSONField(name = "callback")
  private String callback;
  // 向开发者回调时，会原样存储在回调参数的extra字段中返回。
  @JSONField(name = "cp_extra")
  private String cpExtra;
  // 抖音信息和光合信号标识:
  // 不传或传0或1 按抖音信息提现；传2按光合信号提现。
  @JSONField(name = "merchant_entity")
  private String merchantEntity;

  @Override
  public String requestUri() {
    return BdConstants.API_HOST + "/api/apps/ecpay/saas/merchant_withdraw";
  }
}
